﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.Models
{
    /// <summary>
    /// 订单中的牙位
    /// </summary>
    public class ToothPosition:BaseModel
    {
        public Guid DetailId { get; set; }

        [StringLength(10)]
        public string TopLeft { get; set; }
        [StringLength(10)]
        public string TopRight { get; set; }
        [StringLength(10)]
        public string BottomLeft { get; set; }
        [StringLength(10)]
        public string BottomRight { get; set; }

        public decimal Price { get; set; }
        public int Count { get; set; }
        public decimal SumPrice { get; set; }


        // 产品
        public Guid ProductId { get; set; }
        [ForeignKey(nameof(ProductId))]
        public virtual BeGoodAt Product { get; set; }

        [ForeignKey(nameof(DetailId))]
        public virtual OrderDetail OrderDetail { get; set; }

    }
}
